home *** CD-ROM | disk | FTP | other *** search
- float4x4 WorldViewProjection;
- float4x4 ShadowViewProjection;
- float4x4 TextureMatrix;
- float4x4 WorldMatrix;
- float4x4 ViewIT;
-
- texture AlphaTexture;
- texture DiffuseTexture;
- texture ShadowTexture;
- texture CloudsTexture;
- texture FogOfWar;
- texture BurnedTexture;
- float4 BurnFactor = { 0.4, 0.4, 0.4, 0.4 };
-
- float3 LightDirection = { 0.0f, 0.0f, 0.0f };
- float3 SunColor = { 1., 0.86, .70 };
- float3 Ambient = { 0.24, 0.12, 0.04 };
- float4 FogScale = { 0.001953125, 0.001953125, 0.001953125, 0.001953125 };
- float4 ZBias = { 0.0, 0.0, 0.0, -0.004 };
- float4 ShadowOffset;
- float4 CloudUVShift = { 0.0, 0.0, 0.0, 0.0 };
- float4 CloudScale = { 0.01, 0.01, 0.01, 0.01 };
- float4 BlinkFactor = { 0.0, 0.0, 0.0, 0.0 };
-
- technique Technique0
- {
- pass Pass0
- {
- Texture[0] = (DiffuseTexture);
-
- ColorOp[0] = MODULATE;
- ColorArg1[0] = TEXTURE;
- ColorArg2[0] = DIFFUSE;
- AlphaOp[0] = DISABLE;
-
- Texture[1] = (FogOfWar);
- ColorOp[1] = MODULATE;
- ColorArg1[1] = TEXTURE;
- ColorArg2[1] = CURRENT;
- ColorOp[2] = DISABLE;
-
- VertexShaderConstant[0] = <WorldViewProjection>;
- VertexShaderConstant[12] = <WorldMatrix>;
- VertexShaderConstant[16] = <ViewIT>;
- VertexShaderConstant[26] = <BlinkFactor>;
- VertexShaderConstant[27] = <FogScale>;
- VertexShaderConstant[30] = <LightDirection>;
- VertexShaderConstant[32] = <SunColor>;
- VertexShaderConstant[28] = <Ambient>;
-
- ALPHABLENDENABLE = FALSE;
- ALPHATESTENABLE = FALSE;
-
- VertexShader =
- decl
- {
- stream 0;
- float v0[3]; // Position
- float v3[3]; // Normal
- float v6[2]; // Texture coord1
- }
- asm
- {
- vs_1_1
-
- dcl_position v0
- dcl_normal v3
- dcl_texcoord0 v6
-
- m4x4 oPos, v0, c0
- m4x4 r0, v0, c12
- mul r0, r0, c27
- mov oT1.x, r0.x
- mov oT1.y, r0.z
- mov oT0, v6
- dp3 r0, -v3, c30
- mov r1, c32
- add r1, r1, c26
- mad oD0, r0, r1, c28
- };
-
- PixelShader = NULL;
- }
- }
-
-
- // rendering u shadow mapu
- technique Technique1
- {
- pass Pass0
- {
- Lighting = FALSE;
- VertexShader = NULL;
- PixelShader = NULL;
- }
- }
-
-
- technique Technique2
- {
- pass Pass0
- {
- Texture[0] = (DiffuseTexture);
- ColorOp[0] = MODULATE;
- ColorArg1[0] = TEXTURE;
- ColorArg2[0] = DIFFUSE;
- AlphaOp[0] = SELECTARG1;
- AlphaArg1[0] = TEXTURE;
-
- Texture[1] = (FogOfWar);
- ColorOp[1] = MODULATE;
- ColorArg1[1] = TEXTURE;
- ColorArg2[1] = CURRENT;
- ColorOp[2] = DISABLE;
- AlphaOp[1] = DISABLE;
-
- VertexShaderConstant[0] = <WorldViewProjection>;
- VertexShaderConstant[12] = <WorldMatrix>;
- VertexShaderConstant[16] = <ViewIT>;
- VertexShaderConstant[26] = <BlinkFactor>;
- VertexShaderConstant[27] = <FogScale>;
- VertexShaderConstant[30] = <LightDirection>;
- VertexShaderConstant[32] = <SunColor>;
- VertexShaderConstant[28] = <Ambient>;
-
- ALPHABLENDENABLE = TRUE;
- SRCBLEND = SRCALPHA;
- DESTBLEND = INVSRCALPHA;
- ALPHATESTENABLE = TRUE;
- ALPHAFUNC = GREATER;
- ALPHAREF = 1;
-
- VertexShader =
- decl
- {
- stream 0;
- float v0[3]; // Position
- float v3[3]; // Normal
- float v6[2]; // Texture coord1
- }
- asm
- {
- vs_1_1
-
- dcl_position v0
- dcl_normal v3
- dcl_texcoord0 v6
-
- m4x4 oPos, v0, c0
- m4x4 r0, v0, c12
- mul r0, r0, c27
- mov oT1.x, r0.x
- mov oT1.y, r0.z
- mov oT0, v6
- dp3 r0, -v3, c30
- mov r1, c32
- add r1, r1, c26
- mad oD0, r0, r1, c28
- };
-
- PixelShader = NULL;
- }
- }
-
-
- // rendering u shadow mapu
- technique Technique3
- {
- pass Pass0
- {
- VertexShader = NULL;
- PixelShader = NULL;
- }
- }
-
-
- technique Technique4
- {
- pass Pass0
- {
- Texture[0] = (DiffuseTexture);
- ColorOp[0] = MODULATE;
- ColorArg1[0] = TEXTURE;
- ColorArg2[0] = DIFFUSE;
- AlphaOp[0] = SELECTARG1;
- AlphaArg1[0] = TEXTURE;
-
- Texture[1] = (FogOfWar);
- ColorOp[1] = MODULATE;
- ColorArg1[1] = TEXTURE;
- ColorArg2[1] = CURRENT;
- ColorOp[2] = DISABLE;
- AlphaOp[1] = DISABLE;
-
- VertexShaderConstant[0] = <WorldViewProjection>;
- VertexShaderConstant[12] = <WorldMatrix>;
- VertexShaderConstant[16] = <ViewIT>;
- VertexShaderConstant[26] = <BlinkFactor>;
- VertexShaderConstant[27] = <FogScale>;
- VertexShaderConstant[30] = <LightDirection>;
- VertexShaderConstant[32] = <SunColor>;
- VertexShaderConstant[28] = <Ambient>;
-
- ALPHABLENDENABLE = TRUE;
- SRCBLEND = SRCALPHA;
- DESTBLEND = INVSRCALPHA;
- ALPHATESTENABLE = TRUE;
- ALPHAFUNC = GREATER;
- ALPHAREF = 1;
-
- VertexShader =
- decl
- {
- stream 0;
- float v0[3]; // Position
- float v3[3]; // Normal
- float v6[2]; // Texture coord1
- }
- asm
- {
- vs_1_1
-
- dcl_position v0
- dcl_normal v3
- dcl_texcoord0 v6
-
- m4x4 oPos, v0, c0
- m4x4 r0, v0, c12
- mul r0, r0, c27
- mov oT1.x, r0.x
- mov oT1.y, r0.z
- mov oT0, v6
- dp3 r0, -v3, c30
- mov r1, c32
- add r1, r1, c26
- mad oD0, r0, r1, c28
- };
-
- PixelShader = NULL;
- }
- }
-